package com.macro.mall.model_jpa;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table(name="sms_flash_promotion_session")
@DynamicInsert
public class SmsFlashPromotionSession implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    @Column(name = "id")
    private Long id;

    @ApiModelProperty(value = "场次名称")
    @Column(name = "name")
    private String name;

    @ApiModelProperty(value = "每日开始时间")
    @Column(name = "start_time")
    private Date startTime;

    @ApiModelProperty(value = "每日结束时间")
    @Column(name = "end_time")
    private Date endTime;

    @ApiModelProperty(value = "启用状态：0->不启用；1->启用")
    @Column(name = "status")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time")
    @CreatedDate
    private Date createTime;
}